//
//  ZCBHomeStoreH5Controller.m
//  ZhaoCaiHuiBaoRt
//
//  Created by apple on 2017/6/20.
//  Copyright © 2017年 曾平. All rights reserved.
//

#import "ZCBHomeStoreH5Controller.h"

@interface ZCBHomeStoreH5Controller ()

@property (strong, nonatomic) SignalWebView * webview;

@end

@implementation ZCBHomeStoreH5Controller

-(void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    self.tabBarController.tabBar.hidden = YES;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    _webview = [[SignalWebView alloc] initWithFrame:hScreenBounds];
    
    [self.view addSubview:_webview];
    
    //     NSURLRequest * request = [NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@/index.php?app=test&act=member_cooperation_agreement&token=%@", [ServerConfig sharedInstance].serverUrl,[UserModel sharedInstance].token]]];
    
    NSURLRequest * request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.baishisc.com"]];
    [_webview loadRequest:request];
    
    _webview.scrollView.contentInset = UIEdgeInsetsMake(0, 0, 10, 0);
    
}
//#define TTDID_LOAD_FINISH -(void)DID_LOAD_FINISH
//#define TTDID_START -(void)DID_START
//#define TTDID_LOAD_FAILED -(void)DID_LOAD_FAILED
//#define TTDID_LOAD_CANCELLED -(void)DID_LOAD_CANCELLED
//#define TTWILL_START -(void)WILL_START



//暂时不用
//TTWILL_START
//{
//    
//    if( [_webview.loadingURL hasPrefix:@"http://www.baishisc.com/index.php/Mobile/Goods/goodsInfo/id"] )
//    {
//       NSString *SpUrl =  [[_webview.loadingURL componentsSeparatedByString:@".html"] firstObject];
//        
//        NSString *goodsID = [[SpUrl componentsSeparatedByString:@"/"] lastObject];
//        
//        [self.navigationController WillPushViewController:WZSRegist(BSSCGoodsDetailCotroller) animated:YES SetupParms:^(UIViewController *vc, NSMutableDictionary *dict) {
//            
//            [dict addEntriesFromDictionary:@{
//                                             @"goodsID":goodsID,
//                                             }];
//        } callback:^(id parameter) {
//            
//        }];
//        
//        return NO;
//    }
//    
//    return YES;
//}


@end
